function MenuController(jqOpener, jqMenu) {
	var self = this;

	this.jqOpener = jqOpener;
	this.jqMenu = jqMenu;

	this.disableEnter = false;
	this.disableLeave = true;

	this.jqOpener.on('mouseenter', function() {
		if (!self.disableEnter) {
			self.disableEnter = true;

			self.jqOpener.animate({
				opacity : 0
			}, function() {
				self.jqOpener.hide();
			});
			self.jqMenu.animate({
				right : 0
			}, function() {
				setTimeout(function() {
					self.disableLeave = false;
				}, 300);
			});
		}
	});

	this.jqMenu.on('mouseleave', function() {
		if (!self.disableLeave) {
			self.disableLeave = true;

			var width = self.jqMenu.width();
			self.jqOpener.show();
			self.jqOpener.animate({
				opacity : 1
			});
			self.jqMenu.animate({
				right : -width
			}, function() {
				self.disableEnter = false;
			});
		}
	});
}

